home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 September
/
CHIP NET Rehberi Eylül 1998.iso
/
ftp
/
iftp21
/
IHUB.ZIP
/
IHUB.BAT
next >
Wrap
DOS Batch File
|
1997-06-24
|
7KB
|
194 lines
@echo off
:====================================================================
: IHUB.BAT (c) copyright 1997 Santronics Software Inc
:
: NOTE: This batch file is designed for PX/WINS sysops.
:
: This batch file will handle complete IHub operations. It does
: complete FTN netmail, echos and TICS and Internet Email.
: In addition, it will do PXFIDS, which offers a way to send FTN data
: (netmail, echos and tics) to downlinks and uplinks.
:
: This batch file does the following:
:
: EXPORT: Move files to be sent to the EXPORT directory.
:
: 1) If wcgate is defined, move all wcmail gateway mail to gexport
: directory.
:
: 2) Run PXNET to create *.PKT files for routed netmail to IHub.
: The *.PKT files are created in the export directory.
:
: 3) Move all echo bundles belonging to the IHub to the export
: directory.
:
: 4) if available, runs PXFIDS /EXPORT to scan PX data queues to
: create internet email messages to route to down links using
: PXFIDS.
:
: DIAL: Dial IHub, send/receive all files.
:
: 1) Use the new iFTP.EXE intelligent FTP script system to reliably
: sent and receive all files.
:
: IMPORT: Move all new files into appropiate directories.
:
: 1) Make PXNET and ECHO QUEUE files as sent
:
: 2) Run PXFIDS to process any incoming FIDS Internet Email. PXFIDS
: will process what it needs, and leave the rest behind.
:
: 3) Unzip and move all remaining Internet email to
: the WCMAIL gateway directory.
:
: 4) Move all echo mail files to the inbound\echo directory.
:
: 5) Move all tic files to the inbound\tics directory.
:
: 6) Move all remaining files to the inbound directory.
:
: 7) Create semaphores to trigger PX/WINS PXECHO
:
:====================================================================
: VARIABLES TO BE DEFINED
:====================================================================
: bname bundle name for your IHub. See BUNDNAME.EXE on CD
: fido fido address of IHub
: export local FidoNet export directory, make a directory called export
: gexport local Internet export directory, make a directory called gexport
: import local FidoNet import directory, make a directory called import
: gimport local Internet import directory, make a directory called gimport
: wcgate WC5 Gateway Host directory, ie. c:\wc5\gateway\ihub
set bname=
set fido=1:396/1
set export=export
set gexport=gexport
set import=import
set gimport=gimport
set wcgate=c:\wc5\gateway\ihub
:====================================================================
: START BATCH OPERATION
:====================================================================
:--------------------------------------------------------------------
: Check to make sure bname is defined.
:--------------------------------------------------------------------
if .%bname% == .. goto bnameerr
:--------------------------------------------------------------------
: If using wcmail, then move outbound internet e-mail to gexport
: directory.
:--------------------------------------------------------------------
if .%wcgate%. == .. goto nowcout
if exist %wcgate%\*.cmd move %wcgate%\*.cmd %gexport%
if exist %wcgate%\*.xqt move %wcgate%\*.xqt %gexport%
if exist %wcgate%\*.dat move %wcgate%\*.dat %gexport%
:nowcout
:--------------------------------------------------------------------
: Check for PX exported fido mail, if any, move to the export
: directory.
:--------------------------------------------------------------------
pxnet /SCAN /PACK %fido% /FILE %export%\%bname%.pkt
if exist outbound\%bname%.* move outbound\%bname%.* %export%
:--------------------------------------------------------------------
: IF using FIDS, then check for any fids mail.
:--------------------------------------------------------------------
if exist pxfids.exe pxfids /EXPORT
:--------------------------------------------------------------------
: Dial your provider and run iFTP script.
:--------------------------------------------------------------------
iftp /dial /run ihub
if errorlevel 1 goto raserror
:--------------------------------------------------------------------
: Mark PX queues as sent.
:--------------------------------------------------------------------
pxnet /sent %fido%
viewout /sent %fido%
:--------------------------------------------------------------------
: Check for any import FIDS mail. FIDS will process any inbound
: internet e-mail and delete the files in the import directory.
:--------------------------------------------------------------------
if exist pxfids.exe pxfids /IMPORT
:--------------------------------------------------------------------
: If using wcgate, then check for imported internet e-mail.
:--------------------------------------------------------------------
if .%wcgate%. == .. goto nowcin
if exist %gimport%\*.d move %gimport%\*.d %wcgate%
if exist %gimport%\*.x move %gimport%\*.x %wcgate%
if exist %gimport%\*.zip pkunzip -o %gimport%\*.zip %wcgate%
if exist %gimport%\*.zip del %gimport%\*.zip
:nowcin
:--------------------------------------------------------------------
: See if there is any fidonet mail to do.
:--------------------------------------------------------------------
if not exist %import%\*.* goto end
:--------------------------------------------------------------------
: Move bundles into inbound\echo directory.
:--------------------------------------------------------------------
if exist %import%\*.MO? move %import%\*.MO? inbound\echo
if exist %import%\*.TU? move %import%\*.TU? inbound\echo
if exist %import%\*.WE? move %import%\*.WE? inbound\echo
if exist %import%\*.TH? move %import%\*.TH? inbound\echo
if exist %import%\*.FR? move %import%\*.FR? inbound\echo
if exist %import%\*.SA? move %import%\*.SA? inbound\echo
if exist %import%\*.SU? move %import%\*.SU? inbound\echo
:--------------------------------------------------------------------
: Move tics to inbound\tics directory.
:--------------------------------------------------------------------
if exist %import%\*.TIC move %import%\*.TIC inbound\tics
:--------------------------------------------------------------------
: Move remaining files to inbound directory, px expects TIC files
: to be in the normal inbound directory.
:--------------------------------------------------------------------
if exist %import%\*.* move %import%\*.* inbound
echo >inbound\sema\$toss.0
echo >inbound\sema\$tics.0
goto end
:-----------------------------------------------------------------------
:bnameerr
echo Define the bname variable. See bundname.exe
:-----------------------------------------------------------------------
:raserror
ECHO FAILURE TO CONNECT
goto end
:-----------------------------------------------------------------------
:end
set bname=
set fido=
set export=
set gexport=
set import=
set gimport=
set wcgate=